/*
 * Playtone.h
 *
 * Created: 16/11/2012 09:55:45
 *  Author: Administrator
 */ 


#ifndef PLAYTONE_H_
#define PLAYTONE_H_

#include<Arduino.h>

class Melody
{
	
private:
	int8_t speakerPin;
	int8_t length; // the number of notes
	char notes[10]; // a space represents a rest
	int8_t beats[10];
	int tempo;
	void playNote(char note, int duration);
	void playTone(int tone, int duration);
	
public:
	Melody(int8_t speaker_pin);
	void PlayStartup();
	void PlaySuccess();
	void PlayFailure();
};

#endif /* PLAYTONE_H_ */